-- GENERATED SPELL FOR [Bloodmage] --


function spell0_19258(pUnit, Event) --@Arcane Missiles,n/a--
pUnit:FullCastSpellOnTarget(22273,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19258', 654, 1)
end

function spell1_19258(pUnit, Event) --@Blizzard,n/a--
pUnit:FullCastSpellOnTarget(33634,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19258', 11000, 1)
end

function spell2_19258(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(12674,pUnit)
pUnit:RegisterEvent('Sorts_19258', 8309, 1)
end

function spell3_19258(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(15530,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19258', 7000, 1)
end

function Sorts_19258(pUnit, Event)
local choix_sorts_19258 = math.random(0, 3)
if choix_sorts_19258 == 0 then
pUnit:RegisterEvent('spell0_19258', 1, 1)
end
if choix_sorts_19258 == 1 then
pUnit:RegisterEvent('spell1_19258', 1, 1)
end
if choix_sorts_19258 == 2 then
pUnit:RegisterEvent('spell2_19258', 1, 1)
end
if choix_sorts_19258 == 3 then
pUnit:RegisterEvent('spell3_19258', 1, 1)
end
end

function mob19258_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19258', math.random(1500, 3000), 1)
end

function mob19258_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19258_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19258_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19258, 1, 'mob19258_Action')
RegisterUnitEvent(19258, 2, 'mob19258_Leave')
RegisterUnitEvent(19258, 3, 'mob19258_Kill')
RegisterUnitEvent(19258, 4, 'mob19258_Die')
